package com.bulemobi.activity.ac_userCentre_Setting;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.bulemobi.net.tsz.afinal.annotation.view.ViewInject;
import com.bulemobi.util.VerifyUtil;
import com.bulemobi.view.BaseActivity;
import com.bulemobi.view.titleView.ActionBarView;
import com.jsyh.hcb.R;

/***
 * 
 * @author zengys 忘记交易密码
 * 
 * */
public class Ac_Forget_Trade_pwd extends BaseActivity implements OnClickListener{
	 @ViewInject(id = R.id.actionBar)
	    ActionBarView actionBarView;
	    @ViewInject(id = R.id.bt_confirm)
	    TextView bt_confirm;
	    @ViewInject(id = R.id.ac_register_verification)
	    EditText ac_register_verification;
	    @ViewInject(id = R.id.getVer)
	    Button getVer;
	    @ViewInject(id = R.id.ac_register_userName)
	    EditText ac_register_userName;
	    //获取验证标示
	    private final String verTip = "ver";
	    //确认标示
	    private final String confirmTip = "confirm";
      
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
		  setContentView(R.layout.ac_forget_trade_pwd);
		  bt_confirm.setOnClickListener(this);
		  findActionBar();
 	}
	  private void findActionBar() {
	        actionBarView.title.setText(getResources().getString(R.string.ac_forget_treade_name));
	    }
	
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		 switch (v.getId()) {
		case R.id.bt_confirm:
			 //验证手机号码确定
            if (!VerifyUtil.isMobileNO(ac_register_userName.getText().toString())) {
                showToastShort(getResources().getString(R.string.ac_input_you_phone_number));
                return;
                //验证码判断
            } else if (ac_register_verification.getText().length() <= 0) {
                showToastShort(getResources().getString(R.string.forget_password_verification_code));
                return;
            } else {
                openActivity(Ac_Input_trade_newPwd.class);
               // bt_confirm.setBackgroundResource(R.drawable.green_shape);
            }
            break;
		default:
			break;
		}
		
	}

}
